3.1 \(\int \frac{a+b x+\frac{b f x^2}{e}}{\sqrt{d+e x+f x^2}} \, dx\)

Optimal. Leaf size=102 \[ \frac{\left (8 a f-b \left (\frac{4 d f}{e}+e\right )\right ) \tanh ^{-1}\left (\frac{e+2 f x}{2 \sqrt{f} \sqrt{d+e x+f x^2}}\right )}{8 f^{3/2}}+\frac{b x \sqrt{d+e x+f x^2}}{2 e}+\frac{b \sqrt{d+e x+f x^2}}{4 f} \]

[Out]

(b*Sqrt[d + e*x + f*x^2])/(4*f) + (b*x*Sqrt[d + e*x + f*x^2])/(2*e) + ((8*a*f - b*(e + (4*d*f)/e))*ArcTanh[(e
+ 2*f*x)/(2*Sqrt[f]*Sqrt[d + e*x + f*x^2])])/(8*f^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0944484, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {1661, 640, 621, 206} \[ \frac{\left (8 a f-b \left (\frac{4 d f}{e}+e\right )\right ) \tanh ^{-1}\left (\frac{e+2 f x}{2 \sqrt{f} \sqrt{d+e x+f x^2}}\right )}{8 f^{3/2}}+\frac{b x \sqrt{d+e x+f x^2}}{2 e}+\frac{b \sqrt{d+e x+f x^2}}{4 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x + (b*f*x^2)/e)/Sqrt[d + e*x + f*x^2],x]

[Out]

(b*Sqrt[d + e*x + f*x^2])/(4*f) + (b*x*Sqrt[d + e*x + f*x^2])/(2*e) + ((8*a*f - b*(e + (4*d*f)/e))*ArcTanh[(e
+ 2*f*x)/(2*Sqrt[f]*Sqrt[d + e*x + f*x^2])])/(8*f^(3/2))

Rule 1661

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expo
n[Pq, x]]}, Simp[(e*x^(q - 1)*(a + b*x + c*x^2)^(p + 1))/(c*(q + 2*p + 1)), x] + Dist[1/(c*(q + 2*p + 1)), Int
[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + p)*x^(q - 1) - c*e*(q +
 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rule 640

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(a + b*x + c*x^2)^(p +
 1))/(2*c*(p + 1)), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{a+b x+\frac{b f x^2}{e}}{\sqrt{d+e x+f x^2}} \, dx &=\frac{b x \sqrt{d+e x+f x^2}}{2 e}+\frac{\int \frac{\left (2 a-\frac{b d}{e}\right ) f+\frac{b f x}{2}}{\sqrt{d+e x+f x^2}} \, dx}{2 f}\\ &=\frac{b \sqrt{d+e x+f x^2}}{4 f}+\frac{b x \sqrt{d+e x+f x^2}}{2 e}+\frac{\left (-b e+8 a f-\frac{4 b d f}{e}\right ) \int \frac{1}{\sqrt{d+e x+f x^2}} \, dx}{8 f}\\ &=\frac{b \sqrt{d+e x+f x^2}}{4 f}+\frac{b x \sqrt{d+e x+f x^2}}{2 e}+\frac{\left (-b e+8 a f-\frac{4 b d f}{e}\right ) \operatorname{Subst}\left (\int \frac{1}{4 f-x^2} \, dx,x,\frac{e+2 f x}{\sqrt{d+e x+f x^2}}\right )}{4 f}\\ &=\frac{b \sqrt{d+e x+f x^2}}{4 f}+\frac{b x \sqrt{d+e x+f x^2}}{2 e}-\frac{\left (b e-8 a f+\frac{4 b d f}{e}\right ) \tanh ^{-1}\left (\frac{e+2 f x}{2 \sqrt{f} \sqrt{d+e x+f x^2}}\right )}{8 f^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.191387, size = 87, normalized size = 0.85 \[ \frac{2 b \sqrt{f} (e+2 f x) \sqrt{d+x (e+f x)}-\left (b \left (4 d f+e^2\right )-8 a e f\right ) \tanh ^{-1}\left (\frac{e+2 f x}{2 \sqrt{f} \sqrt{d+x (e+f x)}}\right )}{8 e f^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x + (b*f*x^2)/e)/Sqrt[d + e*x + f*x^2],x]

[Out]

(2*b*Sqrt[f]*(e + 2*f*x)*Sqrt[d + x*(e + f*x)] - (-8*a*e*f + b*(e^2 + 4*d*f))*ArcTanh[(e + 2*f*x)/(2*Sqrt[f]*S
qrt[d + x*(e + f*x)])])/(8*e*f^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 136, normalized size = 1.3 \begin{align*}{\frac{bx}{2\,e}\sqrt{f{x}^{2}+ex+d}}+{\frac{b}{4\,f}\sqrt{f{x}^{2}+ex+d}}-{\frac{be}{8}\ln \left ({ \left ({\frac{e}{2}}+fx \right ){\frac{1}{\sqrt{f}}}}+\sqrt{f{x}^{2}+ex+d} \right ){f}^{-{\frac{3}{2}}}}-{\frac{bd}{2\,e}\ln \left ({ \left ({\frac{e}{2}}+fx \right ){\frac{1}{\sqrt{f}}}}+\sqrt{f{x}^{2}+ex+d} \right ){\frac{1}{\sqrt{f}}}}+{a\ln \left ({ \left ({\frac{e}{2}}+fx \right ){\frac{1}{\sqrt{f}}}}+\sqrt{f{x}^{2}+ex+d} \right ){\frac{1}{\sqrt{f}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x+b*f*x^2/e)/(f*x^2+e*x+d)^(1/2),x)

[Out]

1/2*b*x*(f*x^2+e*x+d)^(1/2)/e+1/4*b*(f*x^2+e*x+d)^(1/2)/f-1/8*e*b/f^(3/2)*ln((1/2*e+f*x)/f^(1/2)+(f*x^2+e*x+d)
^(1/2))-1/2/e*b/f^(1/2)*d*ln((1/2*e+f*x)/f^(1/2)+(f*x^2+e*x+d)^(1/2))+a*ln((1/2*e+f*x)/f^(1/2)+(f*x^2+e*x+d)^(
1/2))/f^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x+b*f*x^2/e)/(f*x^2+e*x+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.15693, size = 494, normalized size = 4.84 \begin{align*} \left [-\frac{{\left (b e^{2} + 4 \,{\left (b d - 2 \, a e\right )} f\right )} \sqrt{f} \log \left (-8 \, f^{2} x^{2} - 8 \, e f x - e^{2} - 4 \, \sqrt{f x^{2} + e x + d}{\left (2 \, f x + e\right )} \sqrt{f} - 4 \, d f\right ) - 4 \,{\left (2 \, b f^{2} x + b e f\right )} \sqrt{f x^{2} + e x + d}}{16 \, e f^{2}}, \frac{{\left (b e^{2} + 4 \,{\left (b d - 2 \, a e\right )} f\right )} \sqrt{-f} \arctan \left (\frac{\sqrt{f x^{2} + e x + d}{\left (2 \, f x + e\right )} \sqrt{-f}}{2 \,{\left (f^{2} x^{2} + e f x + d f\right )}}\right ) + 2 \,{\left (2 \, b f^{2} x + b e f\right )} \sqrt{f x^{2} + e x + d}}{8 \, e f^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x+b*f*x^2/e)/(f*x^2+e*x+d)^(1/2),x, algorithm="fricas")

[Out]

[-1/16*((b*e^2 + 4*(b*d - 2*a*e)*f)*sqrt(f)*log(-8*f^2*x^2 - 8*e*f*x - e^2 - 4*sqrt(f*x^2 + e*x + d)*(2*f*x +
e)*sqrt(f) - 4*d*f) - 4*(2*b*f^2*x + b*e*f)*sqrt(f*x^2 + e*x + d))/(e*f^2), 1/8*((b*e^2 + 4*(b*d - 2*a*e)*f)*s
qrt(-f)*arctan(1/2*sqrt(f*x^2 + e*x + d)*(2*f*x + e)*sqrt(-f)/(f^2*x^2 + e*f*x + d*f)) + 2*(2*b*f^2*x + b*e*f)
*sqrt(f*x^2 + e*x + d))/(e*f^2)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{a e}{\sqrt{d + e x + f x^{2}}}\, dx + \int \frac{b e x}{\sqrt{d + e x + f x^{2}}}\, dx + \int \frac{b f x^{2}}{\sqrt{d + e x + f x^{2}}}\, dx}{e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x+b*f*x**2/e)/(f*x**2+e*x+d)**(1/2),x)

[Out]

(Integral(a*e/sqrt(d + e*x + f*x**2), x) + Integral(b*e*x/sqrt(d + e*x + f*x**2), x) + Integral(b*f*x**2/sqrt(
d + e*x + f*x**2), x))/e

________________________________________________________________________________________

Giac [A]  time = 1.30205, size = 113, normalized size = 1.11 \begin{align*} \frac{1}{4} \, \sqrt{f x^{2} + x e + d}{\left (2 \, b x e^{\left (-1\right )} + \frac{b}{f}\right )} + \frac{{\left (4 \, b d f - 8 \, a f e + b e^{2}\right )} e^{\left (-1\right )} \log \left ({\left | -2 \,{\left (\sqrt{f} x - \sqrt{f x^{2} + x e + d}\right )} \sqrt{f} - e \right |}\right )}{8 \, f^{\frac{3}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x+b*f*x^2/e)/(f*x^2+e*x+d)^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(f*x^2 + x*e + d)*(2*b*x*e^(-1) + b/f) + 1/8*(4*b*d*f - 8*a*f*e + b*e^2)*e^(-1)*log(abs(-2*(sqrt(f)*x
- sqrt(f*x^2 + x*e + d))*sqrt(f) - e))/f^(3/2)